{{extend "yesno_layout.html"}}

{{block content_main1}}
    <div class="box">
        <h2>基本信息</h2>
        <div class="box-body">
            {{embed detailview}}
        </div>
    </div>

    <div class="box">
        <h2>工作流信息</h2>
        <div class="box-body">
            <b>工作流状态:</b> {{=workflow.get_state_name()}}
            <br/>
            {{if task_desc:}}
                <b>当前活动:</b> {{=task_desc}}
            {{pass}}
        </div>
    </div>

    {{include "inc_workflow_trans.html"}}


    {{if show_deliver_form:}}
    <div class="box">
        <h2>流转</h2>
        <div class="box-body">

            <form id="deliver_form">
                {{<<deliverform.build.body}}
                {{<<deliverform.build.buttons_line}}
            </form>
        </div>
    </div>
    <script>
    $(function(){
        $('#deliver_form').submit(function(){return false;});
        $('.btnDeliver').click(function(e){
            e.preventDefault();
            var data = $('#deliver_form').serialize();
            data = data+"&to_task="+ $(this).attr("id")
            $.post('/yesno/deliver/{{=obj.id}}', data).success(function(r){
                if(r.success){
                    window.location.reload();
                } else {
                    alert(r.message)
                }
            });
        });
    });
    </script>


    {{pass}}    

{{end}}
